package com.zdemo.hash3;

public class HashCache {

	private final Integer lastNum;
	private final Integer lastHashNum;

	public HashCache() {
		super();
		this.lastNum = 0;
		this.lastHashNum = 0;
	}
	
	public Integer getLastNum() {
		return lastNum;
	}

	public Integer getLastHashNum() {
		return lastHashNum;
	}
	
	public HashCache(Integer lastNum, Integer lastHashNum) {
		super();
		this.lastNum = lastNum;
		this.lastHashNum = lastHashNum;
	}

	public Integer get(Integer num) {
		if(num.intValue() != lastHashNum.intValue()) {
			return null;
		}
		return this.lastHashNum;
	}

}
